﻿@(Html.DevExtreme().Chart()
    .ID("chart")
    .Title(t => t.Text("Production of Crude Oil").Subtitle("(in Barrels)"))
    .CommonSeriesSettings(s => {
        s.Aggregation(a => a.Enabled(true).Method(ChartSeriesAggregationMethod.Sum))
        .ArgumentField("State")
        .ValueField("Value")
        .Type(SeriesType.Bar);
    })
    .SeriesTemplate(t => t.NameField("Year"))
    .ArgumentAxis(a => a.AggregateByCategory(true))
    .DataSource(Model)
)
